/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #1a56db;
    --primary-dark: #1e429f;
    --primary-light: #93c5fd;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f3f4f6;
    --dark-bg: #111827;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-light: #9ca3af;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --border-radius: 0.375rem;
    --orange-color: #fd7e14;
    --orange-dark: #e67312;
}

body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--light-bg);
}

ul {
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* 登录页面样式 */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    /*background-color: var(--primary-color);
    background-image: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);*/
    background-color: #eff9f8;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-header {
    padding: 2rem;
    text-align: center;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--secondary-color);
}

.login-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label, .l-form-label {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.form-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-remember {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.form-remember label {
    display: flex;
    align-items: center;
    color: var(--secondary-color);
    cursor: pointer;
}

.form-remember input[type="checkbox"] {
    margin-right: 0.5rem;
}

.forgot-password {
    color: var(--primary-color);
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.login-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.login-button:hover {
    background-color: var(--primary-dark);
}

/* 主框架样式 */
.main-body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 顶部展示区样式 */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    height: 60px;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.system-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
}

.user-name {
    margin-right: 0.75rem;
    font-weight: 500;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background-color: var(--danger-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.logout-btn i {
    margin-right: 0.5rem;
}

.logout-btn:hover {
    background-color: #dc2626;
}

/* 主内容区容器 */
.main-content-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 侧边栏导航样式 */
.sidebar {
    width: 250px;
    background-color: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    transition: var(--transition);
    cursor: pointer;
}

.nav-link:hover {
    background-color: var(--light-bg);
}

.nav-link.active {
    background-color: rgba(26, 86, 219, 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.nav-link i {
    margin-right: 0.75rem;
    font-size: 1rem;
}

.nav-text {
    flex: 1;
}

.submenu-toggle {
    transition: var(--transition);
}

.submenu {
    list-style: none;
    background-color: var(--light-bg);
    display: none;
}

.submenu.active {
    display: block;
}

.submenu-link {
    display: block;
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    color: var(--text-color);
    transition: var(--transition);
}

.submenu-link:hover {
    background-color: rgba(26, 86, 219, 0.1);
    color: var(--primary-color);
}

.submenu-link.active {
    background-color: rgba(26, 86, 219, 0.1);
    color: var(--primary-color);
}

/* 内容区域样式 */
.content-area {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background-color: var(--light-bg);
}

.content-body {
    background-color: var(--light-bg);
    min-height: 100vh;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.page-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    width: 100px;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-cancel {
    background-color: var(--white);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-cancel:hover {
    background-color: var(--light-bg);
}

/* 数据概览卡片样式 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
}

.stat-change i {
    margin-right: 0.25rem;
}

.stat-change .fa-arrow-up {
    color: var(--success-color);
}

.stat-change .fa-arrow-down {
    color: var(--danger-color);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.user-icon {
    background-color: rgba(26, 86, 219, 0.1);
    color: var(--primary-color);
}

.product-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.order-icon {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.revenue-icon {
    background-color: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

/* 搜索区域样式 */
.search-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    /*max-width: 400px;*/
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
    width: 100%;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-button {
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    transition: var(--transition);
    margin-left: 5px;
}

.search-button:hover {
    background-color: var(--primary-dark);
}

.search-button i {
    margin-right: 0.5rem;
}

.reset-button {
    padding: 0.75rem 1rem;
    background-color: var(--orange-color);
    color: var(--white);
    border-radius: var(--border-radius);
    transition: var(--transition);
    margin-left: 5px;
}

.reset-button:hover {
    background-color: var(--orange-dark);
}

.reset-button i {
    margin-right: 0.5rem;
}

.filter-options {
    display: flex;
    align-items: center;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    margin-right: 0.5rem;
    transition: var(--transition);
    width: 100%;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-button {
    padding: 0.75rem 1rem;
    background-color: var(--white);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
}

.filter-button:hover {
    background-color: var(--light-bg);
}

/* 数据表格样式 */
.data-table-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.data-table tbody tr:hover {
    background-color: rgba(26, 86, 219, 0.05);
}

.data-table a {
    color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));
    text-decoration: underline;
}

.table-checkbox {
    width: 50px;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-badge.inactive {
    background-color: rgba(107, 114, 128, 0.1);
    color: var(--secondary-color);
}

.status-badge.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 50px;
    height: 32px;
    /*border-radius: 50%;*/
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

a.action-btn {
    text-decoration: none;
    cursor: pointer;
}

.view-btn {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.view-btn:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

.edit-btn {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.edit-btn:hover {
    background-color: rgba(16, 185, 129, 0.2);
}

.delete-btn {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.delete-btn:hover {
    background-color: rgba(239, 68, 68, 0.2);
}

/* 分页控件样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.pagination-info {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

/*.pagination-btn:hover:not(:disabled) {*/
/*    background-color: var(--light-bg);*/
/*}*/

.pagination-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 表单样式 */
.form-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.edit-form {
    margin-top: 1rem;
}


.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    margin-bottom: 0px;
    padding-bottom: 0px;
    border-bottom: none;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 1rem;
}

.l-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-label {
    display: contents;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 16px;
}

.form-actions {
    display: flex;
    gap: 3rem;
    justify-content: center;
}

.required {
    color: var(--danger-color);
}

.l-form-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 1.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.l-form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-error {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--danger-color);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-color);
}

.checkbox-item input[type="checkbox"] {
    margin-right: 0.5rem;
}

.full-width {
    grid-column: 1 / -1;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        overflow: hidden;
    }

    .sidebar.expanded {
        width: 250px;
    }

    .nav-text,
    .submenu-toggle {
        display: none;
    }

    .sidebar.expanded .nav-text,
    .sidebar.expanded .submenu-toggle {
        display: block;
    }

    .submenu {
        display: none !important;
    }

    .sidebar.expanded .submenu {
        display: block !important;
    }

    .search-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        max-width: none;
        margin-bottom: 1rem;
    }

    .filter-options {
        justify-content: space-between;
    }
}

/*select option[value=""] {
    color: #999;
    font-style: italic;
}

select option[value=""]:checked {
    color: #999;
}

select:invalid {
    color: #999;
}*/

.condition {
    margin-right: 16px;
    margin-top: 8px;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    width: 280px;
}

.condition button {
    min-width: 85px;
}

.condition label {
    display: inline-block;
    font-weight: 400;
    text-align: right;
    margin-right: 8px;
}

.filter-input {
    display: inline-block;
    -webkit-box-flex: 1;
    flex: 1 1 0%;
}

.condition-more {
    padding-top: 8px;
    padding-left: 8px;
}

.max-w-270 {
    max-width: 270px;
}

.max-h-270 {
    max-height: 270px;
}

.grid-container {
    /*display: grid;*/
    grid-template-columns: repeat(3, 270px);
    height: 300px; /* 设置一个固定高度 */
    overflow-y: auto; /* 垂直滚动条 */
    overflow-x: hidden;
    padding-left: 10px;
}

.image-container {
    width: 270px;
    height: 270px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.image-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.image-wrapper img {
    max-width: 100%; /* 图片最大宽度为容器的宽度 */
    height: 100%;
}

.checkbox-wrapper {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid #6b7280;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-checkbox:hover {
    border-color: #3b82f6;
    transform: scale(1.05);
}

.custom-checkbox.checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

.custom-checkbox.checked i {
    color: white;
    font-size: 14px;
}

.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
}

.radio-container {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-radio.checked {
    border-color: #3b82f6;
    background: #3b82f6;
}

.custom-radio.checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.h-full {
  height: 100%;
}

.video_thumbnail{
    width: 270px;
    height: 270px;
}